home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
JB.1520-5.B.SFX
/
1520 sprite plot
(
.txt
)
next >
Wrap
Commodore BASIC
|
1990-02-12
|
2KB
|
80 lines
0 REM**********************************
1 REM*** SPRITE PLOTTER FOR 1520 BY ***
2 REM***** (C) ALAN BROWN OCT '85 *****
3 REM**********************************
100 PRINT"[147]POKING IN MACHINE CODE"
110 FORI=16384TO16473:READA:POKEI,A:NEXT
120 S=1024:C=55296:CC=C
130 GOSUB590:GOSUB390
140 CS=16466:X=0:Y=40:YY=0:CX=0
150 POKECS,0:BC=16471
160 HB=INT (SA/256):LB=SA-HB*256
170 POKE251,LB:POKE252,HB
180 REM
190 FORII=1TO21:POKE16467,3:SYS16384
200 BC=16471
210 IFPEEK(BC)=0THENBC=BC+1:XC=PEEK(BC):GOSUB440
220 XC=PEEK(BC):IFXC=0THEN270
230 GOSUB470
240 XC=PEEK(BC):IFXC=0THEN270
250 GOSUB440
260 GOTO220
270 CC=CC-24
280 CX=0
290 CC=C+(Y*II):NEXT
300 INPUT"[159]PLOT <Y/N> ";P$
310 IFP$="N"THEN130
320 IFP$="Y"THENGOSUB680:GOTO340
330 GOTO300
340 PRINT"E[146] TO END"
350 PRINT"R[146] TO RUN"
360 GETA$:IFA$="R"THENGOTO130
370 IFA$<>"E"THEN360
380 PRINT"[147]":END
390 PRINT"[147]":POKE53280,0:POKE53281,0
400 FORJ=0TO20:FORR=0TO23
410 POKES+R+(J*40),160:POKEC+R+(J*40),11
420 NEXT:NEXT
430 RETURN
440 CC=CC+XC
450 BC=BC+1
460 RETURN
470 FORP=0TOXC-1
480 POKECC+P,4
490 NEXT
500 CC=CC+XC
510 BC=BC+1
520 RETURN
530 DATA162,24,169,0,157,87,64,202,208,250,172,82,64,177,251,42,176
540 DATA47,141,86,64,169,0,205,83,64,240,1,232,141,83,64,254,87
550 DATA64,173,86,64,206,84,64,208,228,169,8,141,84,64,238,82,64
560 DATA172,82,64,206,85,64,208,210,169,3,141,85,64,96,141,86,64
570 DATA169,1,205,83,64,240,1,232,141,83,64,76,32,64,0,1,8
580 DATA3,0,0,0,2
590 POKE53280,6:POKE53281,6:PRINT"[147]":SN$=""
595 PRINT"1520 SPRITE PLOTTER"
600 INPUT"[158]ENTER SCALE OF PLOT (1-20)";SZ
610 IF(SZ<1)OR(SZ>20)THEN590
620 INPUT"ENTER SPRITE NUMBER";SN$
630 IFSN$<>""THEN670
640 INPUT"ENTER START ADDRESS";SA$
650 IFSA$=""THEN620
660 SA=VAL(SA$):RETURN
670 SN=VAL(SN$):SA=(SN*64):RETURN
680 OPEN4,6:PRINT#4,"SCALE=";SZ:PRINT#4:CLOSE4
690 OPEN1,6,1:PRINT#1,"H":POKECS,0
700 FORJ=1TO21:POKE16467,3:SYS16384:FORG=1TOSZ:BC=16471
710 IFPEEK(BC)=0THENBC=BC+1:XC=PEEK(BC):GOSUB820
720 XC=PEEK(BC):IFXC=0THEN770
730 GOSUB830
740 XC=PEEK(BC):IFXC=0THEN770
750 GOSUB820
760 GOTO720
770 PRINT#1,"I":PRINT#1,"R",-CX,YY:PRINT#1,"I"
780 YY=-(YY+1):PRINT#1,"R",0,YY:CX=0
790 NEXT:NEXT
800 PRINT#1:CLOSE1
810 RETURN
820 CX=CX+(XC*SZ):BC=BC+1:PRINT#1,"R",CX,YY:RETURN
830 CX=CX+(XC*SZ):BC=BC+1:PRINT#1,"J",CX,YY:RETURN